home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 11478 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: diable.upc.es!eduarde
  2. From: eduarde@ac.upc.es (Eduard Elias i Vila)
  3. Newsgroups: comp.lang.c++
  4. Subject: sampling from a sound card in C++
  5. Date: 14 Mar 1996 19:29:48 GMT
  6. Organization: Universitat Politecnica de Catalunya
  7. Message-ID: <4i9s3c$t90@diable.upc.es>
  8. NNTP-Posting-Host: florensa.upc.es
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=iso8895-1
  11. Content-Transfer-Encoding: 7bit
  12. X-Newsreader: TIN [version 1.2 PL2]
  13.  
  14.  
  15.  
  16.    One of my students is trying to built, with me, a program able to determine
  17. the pitch of a note singed in front of a microphone connected to a soundblaster
  18. compatible card.
  19.  
  20.    He is programming in Visual C++, on windows. He doesn't have net access, so
  21. I report the following problem:
  22.  
  23.    To read from the sound card, he uses a sentence like this:
  24.  
  25.  
  26.         Error = waveInOpen( ... , Window1, 0, CALLBACK_WINDOW);
  27.                                   ^^^^^^^
  28.  
  29.    The problem is with the Window1. It is declared as a HWND. He saw that,
  30. depending on the definition or not of STRICT, this type is a UINT (when
  31. STRICT is not defined) or a pointer to a struct (cont struct::HWND__ __near*
  32. when STRICT is defined).
  33.  
  34.    The call waveInOpen needs Window1 to be a UINT but if he undefines the
  35. symbol STRICT, then some other problems appear at link time.
  36.  
  37.    Can somebody tell me what the STRICT symbol is supposed to mean? How to
  38. avoid the linking problems when it is undefined?  or how to convert the pointer
  39. Window1 to a UINT if defined? Is there any other way to send a buffer to be
  40. filled with samples without use this family of calls? ...?
  41.  
  42.    Any help will be very, very, very appreciated. Thanks in advance.
  43.  
  44.  
  45. --
  46.  
  47.     Eduard Elias i Vila
  48.      eduarde@ac.upc.es
  49.